From 639cd3d411c3f61d113a7c403d90669fd5f11f2a Mon Sep 17 00:00:00 2001 From: robertlipe Date: Wed, 21 Aug 2013 19:46:49 +0000 Subject: [PATCH] Kludge around probably TZ issue that I introduced in hiketech. --- gpsbabel/hiketech.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gpsbabel/hiketech.cc b/gpsbabel/hiketech.cc index d1be6f227..d3dbbd53e 100644 --- a/gpsbabel/hiketech.cc +++ b/gpsbabel/hiketech.cc @@ -130,7 +130,17 @@ hiketech_trk_tlr(const route_head* rte) static QString hiketech_format_time(const QDateTime& t) { + // FIXME: Find out why these two blocks of code aren't equivalent. + // it produces times that are 12 hours too late. Double TZ bump? + // for now, just go back to the way we've done it for a decade. -- robert +#if 0 return t.toString("yyyy-MM-dd hh:mm:ss"); +#else + char tbuf[80]; + time_t tm = t.toTime_t(); + strftime(tbuf, sizeof(tbuf), "%Y-%m-%d %I:%M:%S", gmtime(&tm)); + return QString(tbuf); +#endif } static void -- 2.30.2